# 新写法（0.2 之后推荐）
from langchain_community.document_loaders import (
    TextLoader,
    PyPDFLoader,
    Docx2txtLoader,
    UnstructuredExcelLoader,
)
from langchain.text_splitter import CharacterTextSplitter
from langchain.embeddings import OpenAIEmbeddings
from langchain.vectorstores import FAISS

raw_documents = TextLoader(file_path="file/01.md",encoding="utf8").load()
text_splitter = CharacterTextSplitter(chunk_size=100, chunk_overlap=20)
documents = text_splitter.split_documents(raw_documents)
print(documents)

# FAISS.from_documents(documents,)